home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / u_man / cat1 / nettest.z / nettest
Encoding:
Text File  |  2002-10-03  |  13.9 KB  |  331 lines

  1.  
  2.  
  3.  
  4. NNNNEEEETTTTTTTTEEEESSSSTTTT((((1111))))                                                          NNNNEEEETTTTTTTTEEEESSSSTTTT((((1111))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      nettest, nettestd - Performs client and server functions for timing data
  10.      throughput
  11.  
  12. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  13.      /etc/nettest [-c] [-C] [-d] [-f] [-F] [-h] [-b _b_u_f_s_i_z_e] [-S _t_o_s]
  14.      [-n _c_o_n_n_s] [-p tcp|udp|iso] [-s_n] [-m] [-w] [_h_o_s_t [_c_o_u_n_t [_s_i_z_e [_p_o_r_t]]]]
  15.      /etc/nettest [-c] [-C] [-d] [-f] [-h] [-b _b_u_f_s_i_z_e] -p unix|unixd|pipe
  16.      [-n _c_o_n_n_s] [-w] [_c_o_u_n_t [_s_i_z_e [_f_i_l_e_n_a_m_e]]]
  17.      /etc/nettest [-c] [-C] [-d] [-f] [-h] [-b _b_u_f_s_i_z_e]
  18.      -p file _w_r_i_t_e_f_i_l_e _r_e_a_d_f_i_l_e [_c_o_u_n_t [_s_i_z_e]]
  19.      /etc/nettest -V
  20.  
  21.      /etc/nettestd [-d] [-p tcp|udp|iso] [_p_o_r_t]
  22.      /etc/nettestd [-d] -p unix|unixd|pipe [_f_i_l_e_n_a_m_e]
  23.      /etc/nettestd [-d] -p file _r_e_a_d_f_i_l_e _w_r_i_t_e_f_i_l_e
  24.      /etc/nettestd -V
  25.  
  26. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  27.      The nettest and nettestd commands invoke client and server programs that
  28.      are used for timing data throughput of various methods of interprocess
  29.      communication.  For TCP and OSI connections, the nettest program
  30.      establishes a connection with the nettestd program, and then it does
  31.      _c_o_u_n_t writes of _s_i_z_e bytes, followed by _c_o_u_n_t reads of _s_i_z_e bytes.  For
  32.      UDP, the nettest program performs only writes; reads are not performed.
  33.      The nettestd program, if used with UDP connections, reads the data
  34.      packets and prints a message for each data packet it receives.  The
  35.      number and size of the reads and writes may not correlate with the number
  36.      and size of the actual data packets that are transferred; it depends on
  37.      the protocol that is chosen.  If you append an optional k (or K) to the
  38.      _s_i_z_e, _c_o_u_n_t, or _b_u_f_s_i_z_e value, the number specified is multiplied by
  39.      1024.
  40.  
  41.      The nettest and nettestd commands accept the following arguments:
  42.  
  43.      -c   To specify that the data must be checked to verify its accuracy, use
  44.           the -c flag.  Because this is done by comparing one character at a
  45.           time, using the -c option can cause noticeable throughput
  46.           degradation.  The data is verified by filling up the data buffer
  47.           with a 32-byte repeating pattern of all the lower case letters and
  48.           the first 6 upper case letters of the alphabet.  This option is
  49.           useful for detecting data that has been corrupted.  If there is a
  50.           problem with lost or duplicated data, this option may generate a
  51.           large number of error messages.
  52.  
  53.      -C   Similar to -c, except that the data is written out as a sequence of
  54.           sequential 64-bit numbers in network byte order.  Because this is
  55.           done by comparing one word at a time, it is slightly faster than the
  56.           -c option, but it can still cause noticeable throughput degradation.
  57.           This option is useful for detecting data that has been lost or
  58.           duplicated, as it resynchronizes itself when an error is
  59.           encountered.  However, if the size of the lost or duplicated data is
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. NNNNEEEETTTTTTTTEEEESSSSTTTT((((1111))))                                                          NNNNEEEETTTTTTTTEEEESSSSTTTT((((1111))))
  71.  
  72.  
  73.  
  74.           not an even multiple of 8, it may not resynchronize properly.
  75.  
  76.      -d   For TCP, UDP, and OSI connections, the -d flag turns on the socket-
  77.           level debugging flag.
  78.  
  79.      -f   Indicates that a full-size read must be issued.  Usually, when a
  80.           read returns a short count, both nettest and nettestd issue a read
  81.           for the remaining data for that buffer, whether or not a short count
  82.           was received.  (The total number of bytes is not changed.)
  83.  
  84.      -F   For TCP connections, the -F flag turns on the TCP_NODELAY socket
  85.           option.  The TCP code in the kernel usually tries to send only
  86.           full-sized packets over the network; this is accomplished by
  87.           delaying some writes until a full packet size accumulates.  The -F
  88.           flag disables this algorithm.
  89.  
  90.      -h   To turn on hash marks to be printed, use the -h flag.  Each time a
  91.           complete buffer is written or read, a hash mark is printed.  If a
  92.           read returns a partial count and the -f flag is not specified, a
  93.           period is printed.  If the -f flag is specified, a hash mark is
  94.           printed each time a read completes, regardless of the amount of data
  95.           read.
  96.  
  97.      -b _b_u_f_s_i_z_e
  98.           This option applies only to nettest.  For TCP and UDP connections,
  99.           use the -b flag to specify the amount of kernel buffering allowed.
  100.  
  101.      -b   This option applies only to nettestd.  Run as a background daemon.
  102.           In this mode, nettestd will detach itself from its controlling
  103.           terminal, and put itself into the background.  In addition, all
  104.           error messages are logged via syslog(3), instead of via perror(3).
  105.           Note that if both the -C and -v options are used in conjunction with
  106.           the -b option, any errors that are detected in the data stream will
  107.           not be reported.
  108.  
  109.      -S _t_o_s
  110.           For TCP and UDP connections, the -S option can be used to specify
  111.           the Type-of-Service (TOS) value for the connection. (Not Supported)
  112.           A check for the symbolic name _t_o_s in /etc/iptos determines the
  113.           actual order.  (The -t _t_o_s option is a valid synonym, for historical
  114.           compatibility.)
  115.  
  116.      -n _n_c_o_n_n_s
  117.           For TCP, UNIX and ISO connections, the -n option specifies the
  118.           number of simultaneous connections to be opened.  For each
  119.           connection, a subprocess is created.  Each subprocess, after
  120.           establishing a connection to the server and negotiating the options,
  121.           suspends itself.  When all the connections have been established, a
  122.           continue signal is sent to all the subprocesses to start them
  123.           running at the same time.  As each subprocess completes, it returns
  124.           its timing results, and returns that information to the main
  125.           process, which then prints out the individual timing information.
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. NNNNEEEETTTTTTTTEEEESSSSTTTT((((1111))))                                                          NNNNEEEETTTTTTTTEEEESSSSTTTT((((1111))))
  137.  
  138.  
  139.  
  140.           After all the subprocesses have completed, aggregate timing results
  141.           given.  The aggregate timings are based on the total amount of data
  142.           transferred by all the subprocesses, the start time of the first
  143.           subprocess to begin writing its data to its server, and end time of
  144.           the last subprocess to complete reading its data from its server.
  145.           The synchronization information shows when each subprocess began
  146.           running, the duration of the data transfer for each subprocess, and
  147.           ending time of each subprocess.  These times are relative to the
  148.           start time of the first subprocess to began running.
  149.  
  150.      -p _p_r_o_t_o_c_o_l
  151.           Specifies the protocol in use.  The valid values for _p_r_o_t_o_c_o_l are
  152.           tcp, udp, iso, unix, unixd, pipe, and file.
  153.  
  154.           If the -p option is not specified, tcp is the default.
  155.  
  156.           The unix protocol uses UNIX domain stream sockets; _f_i_l_e_n_a_m_e can be
  157.           specified to override the default file name nt_socket.
  158.  
  159.           The unixd protocol uses UNIX domain datagram sockets; _f_i_l_e_n_a_m_e can
  160.           be specified to override the default file name nt_dsocket.
  161.  
  162.           For pipe protocol connections, two named pipes are created when you
  163.           specify _f_i_l_e_n_a_m_e, one for reading and one for writing.  The nettest
  164.           program creates the names of these files by appending R and W to
  165.           _f_i_l_e_n_a_m_e.  The default names are nt_pipeR and nt_pipeW.
  166.  
  167.           For file protocols, _w_r_i_t_e_f_i_l_e is the name of the special file to
  168.           which information is written; _r_e_a_d_f_i_l_e is the name of the special
  169.           file that is read.  The order of _w_r_i_t_e_f_i_l_e and _r_e_a_d_f_i_l_e is reversed
  170.           between nettest and nettestd.  This allows the same file names to be
  171.           specified in the same order for both nettest and nettestd, because
  172.           the file to which nettest writes is the file from which nettestd
  173.           reads, and vice versa.  The intent of this option is to allow
  174.           nettest to be run across arbitrary devices that have a character-
  175.           device interface that can be accessed just by opening up a special
  176.           character file for reading or writing.  It is not intended for
  177.           reading or writing to a regular file.
  178.  
  179.      -s_n  Increases the maximum TCP window by a factor of 2^_n; 1 _< _n _< 14.
  180.  
  181.      -m   Indicates that for datagram connections (-p udp and -p unixd) that
  182.           nettest should use the sendmsg system call insted of the sendto
  183.           system call (see send(2)), and that nettestd should use the recvmsg
  184.           system call insted of the recvfrom system call (see recv(2)), For
  185.           other protocols this option is ignored.
  186.  
  187.      -w   Use the MSG_WAITALL flag when calling recv(2).  This allows the
  188.           kernel to accumulate incoming data so that the read buffer is filled
  189.           before returning control to the application.  The use of this option
  190.           negates the need for the -f option.
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. NNNNEEEETTTTTTTTEEEESSSSTTTT((((1111))))                                                          NNNNEEEETTTTTTTTEEEESSSSTTTT((((1111))))
  203.  
  204.  
  205.  
  206.      -V   Print out information about the version of the program.
  207.  
  208.      _h_o_s_t For TCP, UDP, and OSI connections, _h_o_s_t is the name of the machine
  209.           on which the server is running.  If this is omitted or specified as
  210.           -, the name that gethostname(2) returns is used.
  211.  
  212.      _c_o_u_n_t
  213.           Specifies the number of read or write operations. A value of -
  214.           indicates that the default value must be used.  The default value is
  215.           100.
  216.  
  217.      _s_i_z_e Specifies the number of bytes to be read or written. A value of -
  218.           indicates that the default value must be used.  The default value is
  219.           4096.
  220.  
  221.      _p_o_r_t For TCP and UDP connections, specify _p_o_r_t to select an alternate
  222.           port number.  The _p_o_r_t must be a decimal number.
  223.  
  224.      The output from nettest is timing information and a histogram of the
  225.      various sizes that the read operations returned.  System load affects the
  226.      results because all throughput times are calculated from wall-clock
  227.      times.  The percentages listed for system and user times are percentages
  228.      of wall-clock time.
  229.  
  230.      The write time is measured from the time at which the application starts
  231.      its first write until the time it completes its last write.  The read
  232.      time begins when the last write is complete and ends when the last read
  233.      is complete.  Because the kernel may buffer outgoing data, if everything
  234.      on the network is working correctly, it is normal for the write times to
  235.      be slightly faster than the read times.  This difference in throughput
  236.      represents the amount of buffering in the kernel and the network round-
  237.      trip time.  The read and write time is measured from the time the first
  238.      write is started to the time the last read is completed; thus, if the
  239.      speed of the network is the same in both directions and both machines
  240.      have the same processing power and load, the read and write times are the
  241.      most accurate.
  242.  
  243.      The histogram output shows the sizes that the read system calls return.
  244.      These may not have any correlation to the size and number of packets that
  245.      are actually sent and received over the network.  This is especially true
  246.      for TCP connections.
  247.  
  248. FFFFIIIILLLLEEEESSSS
  249.      /etc/iptos                    IP (TOS) database (TOS is not supported)
  250.  
  251.      nt_socket and nt_dsocket      Default name for stream and datagram UNIX
  252.                                    domain sockets
  253.  
  254.      nt_pipeW, nt_pipeR            Default names for named pipes
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.                                                                         PPPPaaaaggggeeee 4444
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268. NNNNEEEETTTTTTTTEEEESSSSTTTT((((1111))))                                                          NNNNEEEETTTTTTTTEEEESSSSTTTT((((1111))))
  269.  
  270.  
  271.  
  272. BBBBUUUUGGGGSSSS
  273.      The -p pipe, -p unix and -p unixd options create named pipes and UNIX
  274.      domain sockets, respectively, that remain after the programs exit.
  275.  
  276.      If -p pipe _f_i_l_e_n_a_m_e is specified and _f_i_l_e_n_a_m_e is either a relative or
  277.      absolute path name, neither nettest nor nettestd insert the W and R
  278.      before the final component of the path name; they are always prepended to
  279.      the entire file name.
  280.  
  281. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  282.      gethostname(2), recv(2), and send(2)
  283.  
  284.  
  285.  
  286.  
  287.  
  288.  
  289.  
  290.  
  291.  
  292.  
  293.  
  294.  
  295.  
  296.  
  297.  
  298.  
  299.  
  300.  
  301.  
  302.  
  303.  
  304.  
  305.  
  306.  
  307.  
  308.  
  309.  
  310.  
  311.  
  312.  
  313.  
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.                                                                         PPPPaaaaggggeeee 5555
  328.  
  329.  
  330.  
  331.